// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/inventor/");

var inventorgraphics = {
	idle: {
		animation: "inventor_idle.json",
		pack: "inventor.pck",
		loop: true
	},
	worried_idle: {
		animation: "inventor_worried_idle.json",
		pack: "inventor.pck",
		loop: true
	}
}
var inventor = addsprite("inventor", 1, inventorgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Inventor", 2620, 780, 0xffe48d, CENTER, BOTTOM, "chat_inventor", "characters/inventor/charicon_inventor");

// INTRO

play("music_cutscene_dark");

inventor.scale = 0.5;
inventor.x = 2570 - ((inventor.getwidth("idle") * inventor.scale) / 2);
inventor.y = 840;
changebackground("intro_stage");
fadein();
inventor.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);
play("cutscene_audience");

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Welcome back, my little cubeling! It’s so lovely to-");
ladyluck_big.show("idle", true);

actor("Inventor", 2620, 780, 0xffe48d, CENTER, BOTTOM, "chat_inventor", "characters/inventor/charicon_inventor");
speak("Inventor", "Nope! Not listening! I’m not interested|in talking to you any more!");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
ladyluck_big.show("talking-thinking", true);
speak("Lady Luck", "But I was about to make you a very|generous offer, my dear.");
speak("Lady Luck", "Are you telling me you’re not interested|in... making a deal?");
ladyluck_big.show("idle-thinking", true);

speak("Inventor", "LA LA LA LA NOT LISTENING!");
speak("Inventor", "You’re a fraud and a cheat and I’m not|going to waste time arguing with you!");
speak("Inventor", "I’m figuring this whole place out|and I’m making a plan...");
speak("Inventor", "...so you might as well just put me back|in for another fight RIGHT NOW.");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "... well, if you insist. You don’t have|much time left, after all.");
speak("Lady Luck", "Let’s just try another little twist on the|rules, and see how you like THAT...");
ladyluck_big.show("idle-sly", true);

startgamefromcutscene();